import React from 'react'

import AddressItem from '../components/AddressItem'
import Title from '../components/Title'

class Index extends React.Component {
    toEdit = () => {
        const { history } = this.props
        history.push('/addressEdit')
    }
    render() {
        return (
            <div className='addressList'>
                <Title title="我的地址" />
                <AddressItem />
                <div 
                    className='btn addAddressBtn'
                    onClick={this.toEdit}
                >
                    新增地址
                </div>
            </div>
        )
    }
}

export default Index
